Support detect spring-integration-eventhubs, spring-messaging-eventhubs, and spring-kafka#85
Conversation
| func promptMissingEventHubsNameOrExit(console input.Console, ctx context.Context, eventHubs *appdetect.AzureDepEventHubs) { | ||
| switch eventHubs.MavenDependencyType { | ||
| case appdetect.SpringIntegrationEventHubs, appdetect.SpringMessagingEventHubs, appdetect.SpringKafka: | ||
| eventHubsNames, err := promptEventHubsNames(console, ctx) |
There was a problem hiding this comment.
In my understanding, in this case, the event hub name can be detected in customer's project's java code, but we haven't implement this feature now. Because the eventhub name will be used in customer's project. Is this right?
If it can be detected by analyzing java code, it means promptEventHubsNames can be removed after we provide this feature. Is this right?
…tegration # Conflicts: # cli/azd/internal/appdetect/spring_boot.go
| azureDep.EventHubsNamePropertyMap[property] = eventHubsName | ||
| } | ||
| azureDep.FromDependency = append(azureDep.FromDependency, newDep.FromDependency...) | ||
| azureDep.UseKafka = newDep.UseKafka |
There was a problem hiding this comment.
Is it possible that current func executed twice and newDep.UseKafka=true in the first time and newDep.UseKafka=false in the second time?
There was a problem hiding this comment.
Good point. After deprecating the UseKafka property, it won't be impacted.
There was a problem hiding this comment.
What's the expected behavior for above case? Will useKafka func return true or false? Is it possible that customer's application use EventHub for Kafka and EventHub at the same time in one app?
There was a problem hiding this comment.
The expected behavior is that this property should be true as long as kafka used.
So if it is executed twice and newDep.UseKafka=true in the first time and newDep.UseKafka=false in the second time, it will return wrong result.
However, after we deprecate this property and use a func to replace it (as mentioned in the comment #85 (comment)), we can avoid this problem, just check this by checking the DependencyTypes.
rujche
left a comment
There was a problem hiding this comment.
I'll approve & merge current PR. Please help to confirm this: Is it possible that customer's application use EventHub for Kafka and EventHub at the same time in one app?
I verified that user can use |
Thanks for the feedback.
|
@rujche |
|
@haoozhang I guess after support this new feature in SJAD, |
@rujche Sure, let's track this enhancement with this item: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2332666/ |

Support to detect:
Still have issues:
spring.kafka.bootstrap-servers, it will conflict with binder-kafka